package com.xupt.ttms.util;

import lombok.Data;
import org.jetbrains.annotations.TestOnly;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "oos")
@Component
@Data
public class OOSUtil implements InitializingBean {
    private  String  endpoint;
    private  String  accessKeyId;
    private  String  accessKeySecret;
    private  String  bucketName;

    //公开的变量
    public static String END_POINT;
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    public static String BUCKET_NAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT=endpoint;
        ACCESS_KEY_ID=accessKeyId;
        ACCESS_KEY_SECRET=accessKeySecret;
        BUCKET_NAME=bucketName;
    }
}
